package com.googlecode.strutson.commands

import org.apache.commons.lang.SystemUtils

class RunApp {
    void run() {
        def maven = SystemUtils.IS_OS_WINDOWS ? 'mvn.bat' : 'mvn'

        Process process = "${maven} jetty:run".execute()
        process.consumeProcessErrorStream(System.err)
        process.consumeProcessOutputStream(System.out)
        process.waitFor()
    }
}